package customer.design.dispatcher.dispatchermode.filter;//package design.mode.dispatcher.filter;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.stereotype.Component;
//import org.springframework.util.StringUtils;
//
//import javax.servlet.*;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//import java.util.HashMap;
//import java.util.Map;
//
//@Component
//public class MyFilter implements Filter {
//    @SuppressWarnings("unused")
//    private Logger logger = LoggerFactory.getLogger(MyFilter.class);
//
//    @Override
//    public void init(FilterConfig filterConfig) throws ServletException {
//    }
//
//    @Override
//    public void doFilter(ServletRequest servletRequest,
//                         ServletResponse servletResponse,
//                         FilterChain filterChain) throws IOException, ServletException {
//
//        HttpServletRequest request = (HttpServletRequest)servletRequest;
//
//        HttpServletResponse response = (HttpServletResponse) servletResponse;
////
////        //访问地址
////        String uri = request.getRequestURI();
////        if("/switch/caseInfo".equals(uri)) {
////            String token = request.getParameter("token");
////            if(StringUtils.isEmpty(token)) {
////                Map<String, String[]> parameterMap = request.getParameterMap();
////                String[] strings = parameterMap.get("type");
////                Map<String,String[]> hashMap = new HashMap<>(parameterMap);
////                strings=new String[]{"N"};
////                hashMap.put("type", strings);
////                HttpServletRequest req =  request;
////                ParameterRequestWrapper wrapRequest = new ParameterRequestWrapper(req, hashMap);
////                request.getParameterMap();
////                request = wrapRequest;
////            }
////        }
////        logger.info("client - app filter —— ClientAppFilter.java 。 。 。 。 。 。 。 ");
//
//        filterChain.doFilter(request, response);
//
//    }
//
//    @Override
//    public void destroy() {
//
//    }
//}
